import { useState } from 'react';
import { Tabs } from 'antd';
import './index.less';

export default function AppTabs({ items, defalutKey }: any) {
  const [activeKey, setActiveKey] = useState(defalutKey);
  function onTabClick(key: any) {
    setActiveKey(key);
  }

  return <Tabs items={items} tabBarGutter={8} activeKey={activeKey} onTabClick={onTabClick} />;
}
